use std::{
    fmt::Debug,
    ops::Deref,
    str::FromStr,
    sync::{Arc, OnceLock},
};

use serde::{Deserialize, Serialize};
use strum::IntoEnumIterator;
use strum_macros::{AsRefStr, EnumIter, EnumString};

use crate::tui::themes::{
    aardvark_blue::AardvarkBlue, abernathy::Abernathy, adventure::Adventure,
    adventure_time::AdventureTime, adwaita::Adwaita, adwaita_dark::AdwaitaDark,
    afterglow::Afterglow, alabaster::Alabaster, alien_blood::AlienBlood, andromeda::Andromeda,
    apple_classic::AppleClassic, apple_system_colors::AppleSystemColors,
    apple_system_colors_light::AppleSystemColorsLight, arcoiris::Arcoiris, ardoise::Ardoise,
    argonaut::Argonaut, arthur::Arthur, atelier_sulphurpool::AtelierSulphurpool, atom::Atom,
    atom_one_dark::AtomOneDark, atom_one_light::AtomOneLight, aura::Aura, aurora::Aurora, ayu::Ayu,
    ayu_light::AyuLight, ayu_mirage::AyuMirage, banana_blueberry::BananaBlueberry, batman::Batman,
    belafonte_day::BelafonteDay, belafonte_night::BelafonteNight,
    birds_of_paradise::BirdsOfParadise, black_metal::BlackMetal,
    black_metal_bathory_::BlackMetalBathory, black_metal_burzum_::BlackMetalBurzum,
    black_metal_dark_funeral_::BlackMetalDarkFuneral, black_metal_gorgoroth_::BlackMetalGorgoroth,
    black_metal_immortal_::BlackMetalImmortal, black_metal_khold_::BlackMetalKhold,
    black_metal_marduk_::BlackMetalMarduk, black_metal_mayhem_::BlackMetalMayhem,
    black_metal_nile_::BlackMetalNile, black_metal_venom_::BlackMetalVenom, blazer::Blazer,
    blue_berry_pie::BlueBerryPie, blue_dolphin::BlueDolphin, blue_matrix::BlueMatrix,
    bluloco_dark::BlulocoDark, bluloco_light::BlulocoLight, borland::Borland, breadog::Breadog,
    breeze::Breeze, bright_lights::BrightLights, broadcast::Broadcast, brogrammer::Brogrammer,
    builtin_dark::BuiltinDark, builtin_light::BuiltinLight, builtin_pastel_dark::BuiltinPastelDark,
    builtin_solarized_dark::BuiltinSolarizedDark, builtin_solarized_light::BuiltinSolarizedLight,
    builtin_tango_dark::BuiltinTangoDark, builtin_tango_light::BuiltinTangoLight,
    calamity::Calamity, catppuccin::Catppuccin, catppuccin_frappe::CatppuccinFrappe,
    catppuccin_latte::CatppuccinLatte, catppuccin_macchiato::CatppuccinMacchiato,
    catppuccin_mocha::CatppuccinMocha, cga::Cga, chakra::Chakra, chalk::Chalk,
    chalkboard::Chalkboard, challenger_deep::ChallengerDeep, chester::Chester, ciapre::Ciapre,
    citruszest::Citruszest, clrs::Clrs, cobalt_neon::CobaltNeon, cobalt_next::CobaltNext,
    cobalt_next_dark::CobaltNextDark, cobalt_next_minimal::CobaltNextMinimal,
    coffee_theme::CoffeeTheme, crayon_pony_fish::CrayonPonyFish, cursor_dark::CursorDark,
    custom::Custom, cutie_pro::CutiePro, cyberdyne::Cyberdyne, cyberpunk::Cyberpunk,
    cyberpunk_scarlet_protocol::CyberpunkScarletProtocol, dark_modern::DarkModern,
    dark_pastel::DarkPastel, darkermatrix::Darkermatrix, darkmatrix::Darkmatrix,
    darkside::Darkside, dayfox::Dayfox, deep::Deep, desert::Desert, detuned::Detuned,
    dimidium::Dimidium, dimmed_monokai::DimmedMonokai, django::Django,
    django_reborn_again::DjangoRebornAgain, django_smooth::DjangoSmooth, doom_one::DoomOne,
    doom_peacock::DoomPeacock, dot_gov::DotGov, dracula::Dracula, duckbones::Duckbones,
    duotone_dark::DuotoneDark, earthsong::Earthsong, electron_highlighter::ElectronHighlighter,
    elegant::Elegant, elemental::Elemental, elementary::Elementary, embark::Embark,
    embers_dark::EmbersDark, encom::Encom, espresso::Espresso, espresso_libre::EspressoLibre,
    everblush::Everblush, everforest_dark_hard::EverforestDarkHard,
    everforest_light_med::EverforestLightMed, fahrenheit::Fahrenheit, fairyfloss::Fairyfloss,
    farmhouse_dark::FarmhouseDark, farmhouse_light::FarmhouseLight, fideloper::Fideloper,
    firefly_traditional::FireflyTraditional, firefox_dev::FirefoxDev, firewatch::Firewatch,
    fish_tank::FishTank, flat::Flat, flatland::Flatland, flexoki_dark::FlexokiDark,
    flexoki_light::FlexokiLight, floraverse::Floraverse, forest_blue::ForestBlue, framer::Framer,
    front_end_delight::FrontEndDelight, fun_forrest::FunForrest, galaxy::Galaxy, galizur::Galizur,
    ghostty_default_style_dark::GhosttyDefaultStyleDark, git_hub::Github, git_hub_dark::GithubDark,
    git_hub_dark_colorblind::GithubDarkColorblind, git_hub_dark_default::GithubDarkDefault,
    git_hub_dark_dimmed::GithubDarkDimmed, git_hub_dark_high_contrast::GithubDarkHighContrast,
    git_hub_light_colorblind::GithubLightColorblind, git_hub_light_default::GithubLightDefault,
    git_hub_light_high_contrast::GithubLightHighContrast, git_lab_dark::GitlabDark,
    git_lab_dark_grey::GitlabDarkGrey, git_lab_light::GitlabLight, glacier::Glacier, grape::Grape,
    grass::Grass, grey_green::GreyGreen, gruber_darker::GruberDarker, gruvbox_dark::GruvboxDark,
    gruvbox_dark_hard::GruvboxDarkHard, gruvbox_light::GruvboxLight,
    gruvbox_light_hard::GruvboxLightHard, gruvbox_material::GruvboxMaterial, guezwhoz::Guezwhoz,
    hacktober::Hacktober, hardcore::Hardcore, harper::Harper, havn_daggry::HavnDaggry,
    havn_skumring::HavnSkumring, heeler::Heeler, highway::Highway, hipster_green::HipsterGreen,
    hivacruz::Hivacruz, homebrew::Homebrew, hopscotch::Hopscotch, horizon::Horizon,
    horizon_bright::HorizonBright, hurtado::Hurtado, hybrid::Hybrid, ic_green_ppl::IcGreenPpl,
    ic_orange_ppl::IcOrangePpl, iceberg_dark::IcebergDark, iceberg_light::IcebergLight, idea::Idea,
    idle_toes::IdleToes, ir_black::IrBlack, irix_console::IrixConsole, irix_terminal::IrixTerminal,
    jackie_brown::JackieBrown, japanesque::Japanesque, jellybeans::Jellybeans,
    jet_brains_darcula::JetbrainsDarcula, jubi::Jubi, kanagawa_dragon::KanagawaDragon,
    kanagawa_wave::KanagawaWave, kanagawabones::Kanagawabones, kibble::Kibble,
    kitty_default::KittyDefault, kitty_low_contrast::KittyLowContrast, kolorit::Kolorit,
    konsolas::Konsolas, kurokula::Kurokula, lab_fox::LabFox, laser::Laser,
    later_this_evening::LaterThisEvening, lavandula::Lavandula, light_owl::LightOwl,
    liquid_carbon::LiquidCarbon, liquid_carbon_transparent::LiquidCarbonTransparent,
    liquid_carbon_transparent_inverse::LiquidCarbonTransparentInverse, lovelace::Lovelace,
    man_page::ManPage, mariana::Mariana, material::Material, material_dark::MaterialDark,
    material_darker::MaterialDarker, material_design_colors::MaterialDesignColors,
    material_ocean::MaterialOcean, mathias::Mathias, matrix::Matrix, medallion::Medallion,
    melange_dark::MelangeDark, melange_light::MelangeLight, mellifluous::Mellifluous,
    mellow::Mellow, miasma::Miasma, midnight_in_mojave::MidnightInMojave, mirage::Mirage,
    misterioso::Misterioso, molokai::Molokai, mona_lisa::MonaLisa, monokai::Monokai,
    monokai_classic::MonokaiClassic, monokai_pro::MonokaiPro, monokai_pro_light::MonokaiProLight,
    monokai_pro_light_sun::MonokaiProLightSun, monokai_pro_machine::MonokaiProMachine,
    monokai_pro_octagon::MonokaiProOctagon, monokai_pro_ristretto::MonokaiProRistretto,
    monokai_pro_spectrum::MonokaiProSpectrum, monokai_remastered::MonokaiRemastered,
    monokai_soda::MonokaiSoda, monokai_vivid::MonokaiVivid, moonfly::Moonfly,
    neobones_dark::NeobonesDark, neobones_light::NeobonesLight, neon::Neon, neopolitan::Neopolitan,
    neutron::Neutron, night_owl::NightOwl, night_owlish_light::NightOwlishLight,
    nightfox::Nightfox, niji::Niji, nocturnal_winter::NocturnalWinter, nord::Nord,
    nord_light::NordLight, nord_wave::NordWave, novel::Novel, nvim_dark::NvimDark,
    nvim_light::NvimLight, obsidian::Obsidian, ocean::Ocean, oceanic_material::OceanicMaterial,
    oceanic_next::OceanicNext, ollie::Ollie, one_double_dark::OneDoubleDark,
    one_double_light::OneDoubleLight, one_half_dark::OneHalfDark, one_half_light::OneHalfLight,
    operator_mono_dark::OperatorMonoDark, overnight_slumber::OvernightSlumber,
    oxocarbon::Oxocarbon, pale_night_hc::PaleNightHc, pandora::Pandora, paraiso_dark::ParaisoDark,
    paul_millr::PaulMillr, pencil_dark::PencilDark, pencil_light::PencilLight,
    peppermint::Peppermint, phala_green_dark::PhalaGreenDark, piatto_light::PiattoLight,
    pnevma::Pnevma, popping_and_locking::PoppingAndLocking, powershell::Powershell,
    primary::Primary, pro::Pro, pro_light::ProLight, purple_rain::PurpleRain,
    purplepeter::Purplepeter, rapture::Rapture, raycast_dark::RaycastDark,
    raycast_light::RaycastLight, rebecca::Rebecca, red_alert::RedAlert, red_planet::RedPlanet,
    red_sands::RedSands, relaxed::Relaxed, retro::Retro, retro_legends::RetroLegends,
    rippedcasts::Rippedcasts, rose_pine::RosePine, rose_pine_dawn::RosePineDawn,
    rose_pine_moon::RosePineMoon, royal::Royal, ryuuko::Ryuuko, sakura::Sakura,
    scarlet_protocol::ScarletProtocol, sea_shells::SeaShells, seafoam_pastel::SeafoamPastel,
    selenized_dark::SelenizedDark, selenized_light::SelenizedLight,
    seoulbones_dark::SeoulbonesDark, seoulbones_light::SeoulbonesLight, seti::Seti,
    shades_of_purple::ShadesOfPurple, shaman::Shaman, slate::Slate, sleepy_hollow::SleepyHollow,
    smyck::Smyck, snazzy::Snazzy, snazzy_soft::SnazzySoft, soft_server::SoftServer,
    solarized_darcula::SolarizedDarcula,
    solarized_dark_higher_contrast::SolarizedDarkHigherContrast,
    solarized_dark_patched::SolarizedDarkPatched, solarized_osaka_night::SolarizedOsakaNight,
    sonokai::Sonokai, spacedust::Spacedust, spacegray::Spacegray,
    spacegray_bright::SpacegrayBright, spacegray_eighties::SpacegrayEighties,
    spacegray_eighties_dull::SpacegrayEightiesDull, spiderman::Spiderman, spring::Spring,
    square::Square, squirrelsong_dark::SquirrelsongDark, srcery::Srcery, starlight::Starlight,
    styler::Styler, sublette::Sublette, subliminal::Subliminal, sugarplum::Sugarplum,
    sundried::Sundried, symfonic::Symfonic, synthwave::Synthwave, synthwave_alpha::SynthwaveAlpha,
    synthwave_everything::SynthwaveEverything, tango_adapted::TangoAdapted,
    tango_half_adapted::TangoHalfAdapted, tearout::Tearout, teerb::Teerb, terafox::Terafox,
    terminal::Terminal, terminal_basic::TerminalBasic, terminal_basic_dark::TerminalBasicDark,
    thayer_bright::ThayerBright, the_hulk::TheHulk, tinacious_design_dark::TinaciousDesignDark,
    tinacious_design_light::TinaciousDesignLight, tokyo_night::TokyoNight,
    tokyo_night_day::TokyoNightDay, tokyo_night_moon::TokyoNightMoon,
    tokyo_night_night::TokyoNightNight, tokyo_night_storm::TokyoNightStorm, tomorrow::Tomorrow,
    tomorrow_night::TomorrowNight, tomorrow_night_blue::TomorrowNightBlue,
    tomorrow_night_bright::TomorrowNightBright, tomorrow_night_burns::TomorrowNightBurns,
    tomorrow_night_eighties::TomorrowNightEighties, toy_chest::ToyChest, treehouse::Treehouse,
    twilight::Twilight, ubuntu::Ubuntu, ultra_dark::UltraDark, ultra_violent::UltraViolent,
    under_the_sea::UnderTheSea, unikitty::Unikitty, urple::Urple, vague::Vague, vaughn::Vaughn,
    vercel::Vercel, vesper::Vesper, vibrant_ink::VibrantInk, vimbones::Vimbones,
    violet_dark::VioletDark, violet_light::VioletLight, violite::Violite, warm_neon::WarmNeon,
    wez::Wez, whimsy::Whimsy, wild_cherry::WildCherry, wilmersdorf::Wilmersdorf, wombat::Wombat,
    wryan::Wryan, xcode_dark::XcodeDark, xcode_dark_hc::XcodeDarkHc, xcode_light::XcodeLight,
    xcode_light_hc::XcodeLightHc, xcode_wwdc::XcodeWwdc, zenbones::Zenbones,
    zenbones_dark::ZenbonesDark, zenbones_light::ZenbonesLight, zenburn::Zenburn,
    zenburned::Zenburned, zenwritten_dark::ZenwrittenDark, zenwritten_light::ZenwrittenLight,
};

#[derive(Debug, Clone)]
pub struct Theme {
    app_theme: AppTheme,
    styler: Arc<dyn Styler + Send + Sync>,
}

impl Theme {
    pub fn all() -> &'static [AppTheme] {
        static ALL: OnceLock<Vec<AppTheme>> = OnceLock::new();
        ALL.get_or_init(|| AppTheme::iter().collect())
    }

    pub fn app_theme(&self) -> AppTheme {
        self.app_theme
    }

    fn new<S: Styler + Send + Sync + 'static>(app_theme: AppTheme, theme: S) -> Self {
        Theme {
            app_theme,
            styler: Arc::new(theme),
        }
    }
}

impl Default for Theme {
    fn default() -> Self {
        Self::new(AppTheme::Monokai, Monokai)
    }
}

impl From<AppTheme> for Theme {
    fn from(value: AppTheme) -> Self {
        match value {
            AppTheme::MonokaiProLightSun => Theme::new(value, MonokaiProLightSun),
            AppTheme::BlackMetalImmortal => Theme::new(value, BlackMetalImmortal),
            AppTheme::Starlight => Theme::new(value, Starlight),
            AppTheme::AyuLight => Theme::new(value, AyuLight),
            AppTheme::BuiltinTangoLight => Theme::new(value, BuiltinTangoLight),
            AppTheme::NvimLight => Theme::new(value, NvimLight),
            AppTheme::Twilight => Theme::new(value, Twilight),
            AppTheme::Hybrid => Theme::new(value, Hybrid),
            AppTheme::Lovelace => Theme::new(value, Lovelace),
            AppTheme::Spring => Theme::new(value, Spring),
            AppTheme::ZenwrittenDark => Theme::new(value, ZenwrittenDark),
            AppTheme::Neopolitan => Theme::new(value, Neopolitan),
            AppTheme::Ciapre => Theme::new(value, Ciapre),
            AppTheme::Sublette => Theme::new(value, Sublette),
            AppTheme::ManPage => Theme::new(value, ManPage),
            AppTheme::Purplepeter => Theme::new(value, Purplepeter),
            AppTheme::Breadog => Theme::new(value, Breadog),
            AppTheme::LightOwl => Theme::new(value, LightOwl),
            AppTheme::Galizur => Theme::new(value, Galizur),
            AppTheme::RosePine => Theme::new(value, RosePine),
            AppTheme::Molokai => Theme::new(value, Molokai),
            AppTheme::Shaman => Theme::new(value, Shaman),
            AppTheme::Darkermatrix => Theme::new(value, Darkermatrix),
            AppTheme::JackieBrown => Theme::new(value, JackieBrown),
            AppTheme::Espresso => Theme::new(value, Espresso),
            AppTheme::Peppermint => Theme::new(value, Peppermint),
            AppTheme::UltraViolent => Theme::new(value, UltraViolent),
            AppTheme::Primary => Theme::new(value, Primary),
            AppTheme::NvimDark => Theme::new(value, NvimDark),
            AppTheme::RetroLegends => Theme::new(value, RetroLegends),
            AppTheme::IcebergDark => Theme::new(value, IcebergDark),
            AppTheme::MonokaiRemastered => Theme::new(value, MonokaiRemastered),
            AppTheme::DotGov => Theme::new(value, DotGov),
            AppTheme::OceanicNext => Theme::new(value, OceanicNext),
            AppTheme::Material => Theme::new(value, Material),
            AppTheme::BlackMetalMarduk => Theme::new(value, BlackMetalMarduk),
            AppTheme::GreyGreen => Theme::new(value, GreyGreen),
            AppTheme::Broadcast => Theme::new(value, Broadcast),
            AppTheme::Matrix => Theme::new(value, Matrix),
            AppTheme::OneDoubleLight => Theme::new(value, OneDoubleLight),
            AppTheme::ElectronHighlighter => Theme::new(value, ElectronHighlighter),
            AppTheme::Ubuntu => Theme::new(value, Ubuntu),
            AppTheme::Clrs => Theme::new(value, Clrs),
            AppTheme::TomorrowNightBlue => Theme::new(value, TomorrowNightBlue),
            AppTheme::Django => Theme::new(value, Django),
            AppTheme::Brogrammer => Theme::new(value, Brogrammer),
            AppTheme::Mellow => Theme::new(value, Mellow),
            AppTheme::JetbrainsDarcula => Theme::new(value, JetbrainsDarcula),
            AppTheme::MonokaiVivid => Theme::new(value, MonokaiVivid),
            AppTheme::Fideloper => Theme::new(value, Fideloper),
            AppTheme::FarmhouseDark => Theme::new(value, FarmhouseDark),
            AppTheme::Royal => Theme::new(value, Royal),
            AppTheme::GruvboxLight => Theme::new(value, GruvboxLight),
            AppTheme::GruvboxDark => Theme::new(value, GruvboxDark),
            AppTheme::Smyck => Theme::new(value, Smyck),
            AppTheme::Pnevma => Theme::new(value, Pnevma),
            AppTheme::BlackMetalNile => Theme::new(value, BlackMetalNile),
            AppTheme::Elementary => Theme::new(value, Elementary),
            AppTheme::SquirrelsongDark => Theme::new(value, SquirrelsongDark),
            AppTheme::CatppuccinMocha => Theme::new(value, CatppuccinMocha),
            AppTheme::BlackMetalBathory => Theme::new(value, BlackMetalBathory),
            AppTheme::LiquidCarbonTransparentInverse => {
                Theme::new(value, LiquidCarbonTransparentInverse)
            }
            AppTheme::FunForrest => Theme::new(value, FunForrest),
            AppTheme::Arcoiris => Theme::new(value, Arcoiris),
            AppTheme::Desert => Theme::new(value, Desert),
            AppTheme::DoomOne => Theme::new(value, DoomOne),
            AppTheme::SpacegrayEighties => Theme::new(value, SpacegrayEighties),
            AppTheme::WarmNeon => Theme::new(value, WarmNeon),
            AppTheme::Dimidium => Theme::new(value, Dimidium),
            AppTheme::GitlabDarkGrey => Theme::new(value, GitlabDarkGrey),
            AppTheme::Cyberpunk => Theme::new(value, Cyberpunk),
            AppTheme::Tearout => Theme::new(value, Tearout),
            AppTheme::Aura => Theme::new(value, Aura),
            AppTheme::Grape => Theme::new(value, Grape),
            AppTheme::SelenizedLight => Theme::new(value, SelenizedLight),
            AppTheme::Blazer => Theme::new(value, Blazer),
            AppTheme::KanagawaDragon => Theme::new(value, KanagawaDragon),
            AppTheme::Hurtado => Theme::new(value, Hurtado),
            AppTheme::MaterialOcean => Theme::new(value, MaterialOcean),
            AppTheme::XcodeDarkHc => Theme::new(value, XcodeDarkHc),
            AppTheme::Citruszest => Theme::new(value, Citruszest),
            AppTheme::CrayonPonyFish => Theme::new(value, CrayonPonyFish),
            AppTheme::Relaxed => Theme::new(value, Relaxed),
            AppTheme::Rapture => Theme::new(value, Rapture),
            AppTheme::BlackMetalGorgoroth => Theme::new(value, BlackMetalGorgoroth),
            AppTheme::Cyberdyne => Theme::new(value, Cyberdyne),
            AppTheme::GitlabLight => Theme::new(value, GitlabLight),
            AppTheme::IcebergLight => Theme::new(value, IcebergLight),
            AppTheme::Floraverse => Theme::new(value, Floraverse),
            AppTheme::AtomOneDark => Theme::new(value, AtomOneDark),
            AppTheme::ShadesOfPurple => Theme::new(value, ShadesOfPurple),
            AppTheme::Wez => Theme::new(value, Wez),
            AppTheme::AyuMirage => Theme::new(value, AyuMirage),
            AppTheme::Obsidian => Theme::new(value, Obsidian),
            AppTheme::Kolorit => Theme::new(value, Kolorit),
            AppTheme::Hivacruz => Theme::new(value, Hivacruz),
            AppTheme::AdwaitaDark => Theme::new(value, AdwaitaDark),
            AppTheme::PencilLight => Theme::new(value, PencilLight),
            AppTheme::BlulocoDark => Theme::new(value, BlulocoDark),
            AppTheme::BuiltinTangoDark => Theme::new(value, BuiltinTangoDark),
            AppTheme::BelafonteDay => Theme::new(value, BelafonteDay),
            AppTheme::BlueDolphin => Theme::new(value, BlueDolphin),
            AppTheme::MonokaiPro => Theme::new(value, MonokaiPro),
            AppTheme::TheHulk => Theme::new(value, TheHulk),
            AppTheme::Synthwave => Theme::new(value, Synthwave),
            AppTheme::Konsolas => Theme::new(value, Konsolas),
            AppTheme::Dayfox => Theme::new(value, Dayfox),
            AppTheme::SolarizedDarcula => Theme::new(value, SolarizedDarcula),
            AppTheme::NordWave => Theme::new(value, NordWave),
            AppTheme::Urple => Theme::new(value, Urple),
            AppTheme::XcodeLightHc => Theme::new(value, XcodeLightHc),
            AppTheme::TokyoNightNight => Theme::new(value, TokyoNightNight),
            AppTheme::SynthwaveAlpha => Theme::new(value, SynthwaveAlpha),
            AppTheme::EspressoLibre => Theme::new(value, EspressoLibre),
            AppTheme::GithubDarkDefault => Theme::new(value, GithubDarkDefault),
            AppTheme::Breeze => Theme::new(value, Breeze),
            AppTheme::Fahrenheit => Theme::new(value, Fahrenheit),
            AppTheme::CatppuccinLatte => Theme::new(value, CatppuccinLatte),
            AppTheme::Miasma => Theme::new(value, Miasma),
            AppTheme::EverforestDarkHard => Theme::new(value, EverforestDarkHard),
            AppTheme::Seti => Theme::new(value, Seti),
            AppTheme::BlackMetalDarkFuneral => Theme::new(value, BlackMetalDarkFuneral),
            AppTheme::Zenburned => Theme::new(value, Zenburned),
            AppTheme::CobaltNextDark => Theme::new(value, CobaltNextDark),
            AppTheme::DjangoRebornAgain => Theme::new(value, DjangoRebornAgain),
            AppTheme::Treehouse => Theme::new(value, Treehouse),
            AppTheme::Mariana => Theme::new(value, Mariana),
            AppTheme::Retro => Theme::new(value, Retro),
            AppTheme::CursorDark => Theme::new(value, CursorDark),
            AppTheme::Hardcore => Theme::new(value, Hardcore),
            AppTheme::Neon => Theme::new(value, Neon),
            AppTheme::GitlabDark => Theme::new(value, GitlabDark),
            AppTheme::UnderTheSea => Theme::new(value, UnderTheSea),
            AppTheme::VioletLight => Theme::new(value, VioletLight),
            AppTheme::Ayu => Theme::new(value, Ayu),
            AppTheme::HavnSkumring => Theme::new(value, HavnSkumring),
            AppTheme::Afterglow => Theme::new(value, Afterglow),
            AppTheme::DoomPeacock => Theme::new(value, DoomPeacock),
            AppTheme::AppleClassic => Theme::new(value, AppleClassic),
            AppTheme::VibrantInk => Theme::new(value, VibrantInk),
            AppTheme::Arthur => Theme::new(value, Arthur),
            AppTheme::TinaciousDesignLight => Theme::new(value, TinaciousDesignLight),
            AppTheme::WildCherry => Theme::new(value, WildCherry),
            AppTheme::HipsterGreen => Theme::new(value, HipsterGreen),
            AppTheme::Mathias => Theme::new(value, Mathias),
            AppTheme::NeobonesDark => Theme::new(value, NeobonesDark),
            AppTheme::SpacegrayEightiesDull => Theme::new(value, SpacegrayEightiesDull),
            AppTheme::NightOwlishLight => Theme::new(value, NightOwlishLight),
            AppTheme::Chester => Theme::new(value, Chester),
            AppTheme::Pandora => Theme::new(value, Pandora),
            AppTheme::GhosttyDefaultStyleDark => Theme::new(value, GhosttyDefaultStyleDark),
            AppTheme::OneDoubleDark => Theme::new(value, OneDoubleDark),
            AppTheme::ZenbonesLight => Theme::new(value, ZenbonesLight),
            AppTheme::Niji => Theme::new(value, Niji),
            AppTheme::ProLight => Theme::new(value, ProLight),
            AppTheme::SpacegrayBright => Theme::new(value, SpacegrayBright),
            AppTheme::SeaShells => Theme::new(value, SeaShells),
            AppTheme::Vague => Theme::new(value, Vague),
            AppTheme::TokyoNightMoon => Theme::new(value, TokyoNightMoon),
            AppTheme::XcodeLight => Theme::new(value, XcodeLight),
            AppTheme::AardvarkBlue => Theme::new(value, AardvarkBlue),
            AppTheme::ZenwrittenLight => Theme::new(value, ZenwrittenLight),
            AppTheme::CobaltNeon => Theme::new(value, CobaltNeon),
            AppTheme::DuotoneDark => Theme::new(value, DuotoneDark),
            AppTheme::Cga => Theme::new(value, Cga),
            AppTheme::Idea => Theme::new(value, Idea),
            AppTheme::SynthwaveEverything => Theme::new(value, SynthwaveEverything),
            AppTheme::BlackMetal => Theme::new(value, BlackMetal),
            AppTheme::HavnDaggry => Theme::new(value, HavnDaggry),
            AppTheme::Github => Theme::new(value, Github),
            AppTheme::SeafoamPastel => Theme::new(value, SeafoamPastel),
            AppTheme::Chalkboard => Theme::new(value, Chalkboard),
            AppTheme::Elemental => Theme::new(value, Elemental),
            AppTheme::Novel => Theme::new(value, Novel),
            AppTheme::Snazzy => Theme::new(value, Snazzy),
            AppTheme::MonokaiClassic => Theme::new(value, MonokaiClassic),
            AppTheme::Zenburn => Theme::new(value, Zenburn),
            AppTheme::GithubLightDefault => Theme::new(value, GithubLightDefault),
            AppTheme::Laser => Theme::new(value, Laser),
            AppTheme::BirdsOfParadise => Theme::new(value, BirdsOfParadise),
            AppTheme::Mellifluous => Theme::new(value, Mellifluous),
            AppTheme::Fairyfloss => Theme::new(value, Fairyfloss),
            AppTheme::NightOwl => Theme::new(value, NightOwl),
            AppTheme::OneHalfDark => Theme::new(value, OneHalfDark),
            AppTheme::FireflyTraditional => Theme::new(value, FireflyTraditional),
            AppTheme::Terafox => Theme::new(value, Terafox),
            AppTheme::RosePineDawn => Theme::new(value, RosePineDawn),
            AppTheme::Sundried => Theme::new(value, Sundried),
            AppTheme::TokyoNightStorm => Theme::new(value, TokyoNightStorm),
            AppTheme::Nord => Theme::new(value, Nord),
            AppTheme::PiattoLight => Theme::new(value, PiattoLight),
            AppTheme::Abernathy => Theme::new(value, Abernathy),
            AppTheme::TokyoNightDay => Theme::new(value, TokyoNightDay),
            AppTheme::Powershell => Theme::new(value, Powershell),
            AppTheme::Jellybeans => Theme::new(value, Jellybeans),
            AppTheme::BlueMatrix => Theme::new(value, BlueMatrix),
            AppTheme::Sonokai => Theme::new(value, Sonokai),
            AppTheme::TomorrowNightBurns => Theme::new(value, TomorrowNightBurns),
            AppTheme::Sakura => Theme::new(value, Sakura),
            AppTheme::RaycastDark => Theme::new(value, RaycastDark),
            AppTheme::KanagawaWave => Theme::new(value, KanagawaWave),
            AppTheme::CutiePro => Theme::new(value, CutiePro),
            AppTheme::Horizon => Theme::new(value, Horizon),
            AppTheme::Spiderman => Theme::new(value, Spiderman),
            AppTheme::BlackMetalMayhem => Theme::new(value, BlackMetalMayhem),
            AppTheme::KittyDefault => Theme::new(value, KittyDefault),
            AppTheme::IdleToes => Theme::new(value, IdleToes),
            AppTheme::TerminalBasicDark => Theme::new(value, TerminalBasicDark),
            AppTheme::Framer => Theme::new(value, Framer),
            AppTheme::Moonfly => Theme::new(value, Moonfly),
            AppTheme::MonokaiSoda => Theme::new(value, MonokaiSoda),
            AppTheme::Slate => Theme::new(value, Slate),
            AppTheme::Firewatch => Theme::new(value, Firewatch),
            AppTheme::Spacegray => Theme::new(value, Spacegray),
            AppTheme::Symfonic => Theme::new(value, Symfonic),
            AppTheme::Spacedust => Theme::new(value, Spacedust),
            AppTheme::Teerb => Theme::new(value, Teerb),
            AppTheme::Rippedcasts => Theme::new(value, Rippedcasts),
            AppTheme::TomorrowNightBright => Theme::new(value, TomorrowNightBright),
            AppTheme::Chalk => Theme::new(value, Chalk),
            AppTheme::Heeler => Theme::new(value, Heeler),
            AppTheme::Alabaster => Theme::new(value, Alabaster),
            AppTheme::Galaxy => Theme::new(value, Galaxy),
            AppTheme::Adventure => Theme::new(value, Adventure),
            AppTheme::GithubLightHighContrast => Theme::new(value, GithubLightHighContrast),
            AppTheme::Unikitty => Theme::new(value, Unikitty),
            AppTheme::Lavandula => Theme::new(value, Lavandula),
            AppTheme::TinaciousDesignDark => Theme::new(value, TinaciousDesignDark),
            AppTheme::Flatland => Theme::new(value, Flatland),
            AppTheme::GithubLightColorblind => Theme::new(value, GithubLightColorblind),
            AppTheme::ChallengerDeep => Theme::new(value, ChallengerDeep),
            AppTheme::Mirage => Theme::new(value, Mirage),
            AppTheme::Deep => Theme::new(value, Deep),
            AppTheme::Vesper => Theme::new(value, Vesper),
            AppTheme::Aurora => Theme::new(value, Aurora),
            AppTheme::Jubi => Theme::new(value, Jubi),
            AppTheme::Calamity => Theme::new(value, Calamity),
            AppTheme::Neutron => Theme::new(value, Neutron),
            AppTheme::RedAlert => Theme::new(value, RedAlert),
            AppTheme::MaterialDark => Theme::new(value, MaterialDark),
            AppTheme::Everblush => Theme::new(value, Everblush),
            AppTheme::Kurokula => Theme::new(value, Kurokula),
            AppTheme::SolarizedOsakaNight => Theme::new(value, SolarizedOsakaNight),
            AppTheme::PaleNightHc => Theme::new(value, PaleNightHc),
            AppTheme::Ardoise => Theme::new(value, Ardoise),
            AppTheme::MonokaiProSpectrum => Theme::new(value, MonokaiProSpectrum),
            AppTheme::GruberDarker => Theme::new(value, GruberDarker),
            AppTheme::GithubDark => Theme::new(value, GithubDark),
            AppTheme::SolarizedDarkPatched => Theme::new(value, SolarizedDarkPatched),
            AppTheme::MelangeLight => Theme::new(value, MelangeLight),
            AppTheme::Hacktober => Theme::new(value, Hacktober),
            AppTheme::IcGreenPpl => Theme::new(value, IcGreenPpl),
            AppTheme::OperatorMonoDark => Theme::new(value, OperatorMonoDark),
            AppTheme::TomorrowNight => Theme::new(value, TomorrowNight),
            AppTheme::Homebrew => Theme::new(value, Homebrew),
            AppTheme::Wryan => Theme::new(value, Wryan),
            AppTheme::GithubDarkColorblind => Theme::new(value, GithubDarkColorblind),
            AppTheme::Borland => Theme::new(value, Borland),
            AppTheme::RedSands => Theme::new(value, RedSands),
            AppTheme::Rebecca => Theme::new(value, Rebecca),
            AppTheme::TerminalBasic => Theme::new(value, TerminalBasic),
            AppTheme::Dracula => Theme::new(value, Dracula),
            AppTheme::Nightfox => Theme::new(value, Nightfox),
            AppTheme::BuiltinLight => Theme::new(value, BuiltinLight),
            AppTheme::BuiltinSolarizedLight => Theme::new(value, BuiltinSolarizedLight),
            AppTheme::Glacier => Theme::new(value, Glacier),
            AppTheme::CatppuccinFrappe => Theme::new(value, CatppuccinFrappe),
            AppTheme::ForestBlue => Theme::new(value, ForestBlue),
            AppTheme::BuiltinDark => Theme::new(value, BuiltinDark),
            AppTheme::Whimsy => Theme::new(value, Whimsy),
            AppTheme::XcodeDark => Theme::new(value, XcodeDark),
            AppTheme::GruvboxDarkHard => Theme::new(value, GruvboxDarkHard),
            AppTheme::Ryuuko => Theme::new(value, Ryuuko),
            AppTheme::DjangoSmooth => Theme::new(value, DjangoSmooth),
            AppTheme::VioletDark => Theme::new(value, VioletDark),
            AppTheme::PurpleRain => Theme::new(value, PurpleRain),
            AppTheme::Square => Theme::new(value, Square),
            AppTheme::SeoulbonesDark => Theme::new(value, SeoulbonesDark),
            AppTheme::DarkModern => Theme::new(value, DarkModern),
            AppTheme::MonokaiProRistretto => Theme::new(value, MonokaiProRistretto),
            AppTheme::IrixConsole => Theme::new(value, IrixConsole),
            AppTheme::MelangeDark => Theme::new(value, MelangeDark),
            AppTheme::Earthsong => Theme::new(value, Earthsong),
            AppTheme::LiquidCarbon => Theme::new(value, LiquidCarbon),
            AppTheme::GruvboxLightHard => Theme::new(value, GruvboxLightHard),
            AppTheme::AdventureTime => Theme::new(value, AdventureTime),
            AppTheme::PhalaGreenDark => Theme::new(value, PhalaGreenDark),
            AppTheme::SoftServer => Theme::new(value, SoftServer),
            AppTheme::PencilDark => Theme::new(value, PencilDark),
            AppTheme::FrontEndDelight => Theme::new(value, FrontEndDelight),
            AppTheme::Grass => Theme::new(value, Grass),
            AppTheme::Ollie => Theme::new(value, Ollie),
            AppTheme::MidnightInMojave => Theme::new(value, MidnightInMojave),
            AppTheme::Highway => Theme::new(value, Highway),
            AppTheme::OvernightSlumber => Theme::new(value, OvernightSlumber),
            AppTheme::BelafonteNight => Theme::new(value, BelafonteNight),
            AppTheme::TangoAdapted => Theme::new(value, TangoAdapted),
            AppTheme::BlueBerryPie => Theme::new(value, BlueBerryPie),
            AppTheme::Tomorrow => Theme::new(value, Tomorrow),
            AppTheme::ScarletProtocol => Theme::new(value, ScarletProtocol),
            AppTheme::KittyLowContrast => Theme::new(value, KittyLowContrast),
            AppTheme::OceanicMaterial => Theme::new(value, OceanicMaterial),
            AppTheme::Guezwhoz => Theme::new(value, Guezwhoz),
            AppTheme::XcodeWwdc => Theme::new(value, XcodeWwdc),
            AppTheme::ToyChest => Theme::new(value, ToyChest),
            AppTheme::PoppingAndLocking => Theme::new(value, PoppingAndLocking),
            AppTheme::NeobonesLight => Theme::new(value, NeobonesLight),
            AppTheme::AtelierSulphurpool => Theme::new(value, AtelierSulphurpool),
            AppTheme::CobaltNext => Theme::new(value, CobaltNext),
            AppTheme::Atom => Theme::new(value, Atom),
            AppTheme::ZenbonesDark => Theme::new(value, ZenbonesDark),
            AppTheme::Zenbones => Theme::new(value, Zenbones),
            AppTheme::BrightLights => Theme::new(value, BrightLights),
            AppTheme::GithubDarkHighContrast => Theme::new(value, GithubDarkHighContrast),
            AppTheme::PaulMillr => Theme::new(value, PaulMillr),
            AppTheme::NocturnalWinter => Theme::new(value, NocturnalWinter),
            AppTheme::LabFox => Theme::new(value, LabFox),
            AppTheme::GithubDarkDimmed => Theme::new(value, GithubDarkDimmed),
            AppTheme::Detuned => Theme::new(value, Detuned),
            AppTheme::Misterioso => Theme::new(value, Misterioso),
            AppTheme::BlackMetalKhold => Theme::new(value, BlackMetalKhold),
            AppTheme::CoffeeTheme => Theme::new(value, CoffeeTheme),
            AppTheme::Japanesque => Theme::new(value, Japanesque),
            AppTheme::BlackMetalBurzum => Theme::new(value, BlackMetalBurzum),
            AppTheme::LiquidCarbonTransparent => Theme::new(value, LiquidCarbonTransparent),
            AppTheme::Darkmatrix => Theme::new(value, Darkmatrix),
            AppTheme::Vimbones => Theme::new(value, Vimbones),
            AppTheme::SolarizedDarkHigherContrast => Theme::new(value, SolarizedDarkHigherContrast),
            AppTheme::DimmedMonokai => Theme::new(value, DimmedMonokai),
            AppTheme::IrBlack => Theme::new(value, IrBlack),
            AppTheme::Pro => Theme::new(value, Pro),
            AppTheme::MonaLisa => Theme::new(value, MonaLisa),
            AppTheme::IcOrangePpl => Theme::new(value, IcOrangePpl),
            AppTheme::Wilmersdorf => Theme::new(value, Wilmersdorf),
            AppTheme::RaycastLight => Theme::new(value, RaycastLight),
            AppTheme::CobaltNextMinimal => Theme::new(value, CobaltNextMinimal),
            AppTheme::CatppuccinMacchiato => Theme::new(value, CatppuccinMacchiato),
            AppTheme::Oxocarbon => Theme::new(value, Oxocarbon),
            AppTheme::FishTank => Theme::new(value, FishTank),
            AppTheme::BuiltinSolarizedDark => Theme::new(value, BuiltinSolarizedDark),
            AppTheme::Andromeda => Theme::new(value, Andromeda),
            AppTheme::SnazzySoft => Theme::new(value, SnazzySoft),
            AppTheme::Vercel => Theme::new(value, Vercel),
            AppTheme::NordLight => Theme::new(value, NordLight),
            AppTheme::BuiltinPastelDark => Theme::new(value, BuiltinPastelDark),
            AppTheme::TomorrowNightEighties => Theme::new(value, TomorrowNightEighties),
            AppTheme::OneHalfLight => Theme::new(value, OneHalfLight),
            AppTheme::BlackMetalVenom => Theme::new(value, BlackMetalVenom),
            AppTheme::HorizonBright => Theme::new(value, HorizonBright),
            AppTheme::TangoHalfAdapted => Theme::new(value, TangoHalfAdapted),
            AppTheme::MaterialDarker => Theme::new(value, MaterialDarker),
            AppTheme::EmbersDark => Theme::new(value, EmbersDark),
            AppTheme::Violite => Theme::new(value, Violite),
            AppTheme::MonokaiProMachine => Theme::new(value, MonokaiProMachine),
            AppTheme::Encom => Theme::new(value, Encom),
            AppTheme::Embark => Theme::new(value, Embark),
            AppTheme::Ocean => Theme::new(value, Ocean),
            AppTheme::Batman => Theme::new(value, Batman),
            AppTheme::RedPlanet => Theme::new(value, RedPlanet),
            AppTheme::AppleSystemColors => Theme::new(value, AppleSystemColors),
            AppTheme::AppleSystemColorsLight => Theme::new(value, AppleSystemColorsLight),
            AppTheme::MonokaiProOctagon => Theme::new(value, MonokaiProOctagon),
            AppTheme::ThayerBright => Theme::new(value, ThayerBright),
            AppTheme::DarkPastel => Theme::new(value, DarkPastel),
            AppTheme::BlulocoLight => Theme::new(value, BlulocoLight),
            AppTheme::EverforestLightMed => Theme::new(value, EverforestLightMed),
            AppTheme::LaterThisEvening => Theme::new(value, LaterThisEvening),
            AppTheme::FlexokiLight => Theme::new(value, FlexokiLight),
            AppTheme::Darkside => Theme::new(value, Darkside),
            AppTheme::Harper => Theme::new(value, Harper),
            AppTheme::AtomOneLight => Theme::new(value, AtomOneLight),
            AppTheme::MaterialDesignColors => Theme::new(value, MaterialDesignColors),
            AppTheme::Adwaita => Theme::new(value, Adwaita),
            AppTheme::FirefoxDev => Theme::new(value, FirefoxDev),
            AppTheme::Kibble => Theme::new(value, Kibble),
            AppTheme::Duckbones => Theme::new(value, Duckbones),
            AppTheme::Hopscotch => Theme::new(value, Hopscotch),
            AppTheme::FarmhouseLight => Theme::new(value, FarmhouseLight),
            AppTheme::Srcery => Theme::new(value, Srcery),
            AppTheme::Flat => Theme::new(value, Flat),
            AppTheme::Subliminal => Theme::new(value, Subliminal),
            AppTheme::Kanagawabones => Theme::new(value, Kanagawabones),
            AppTheme::AlienBlood => Theme::new(value, AlienBlood),
            AppTheme::SelenizedDark => Theme::new(value, SelenizedDark),
            AppTheme::FlexokiDark => Theme::new(value, FlexokiDark),
            AppTheme::UltraDark => Theme::new(value, UltraDark),
            AppTheme::BananaBlueberry => Theme::new(value, BananaBlueberry),
            AppTheme::Elegant => Theme::new(value, Elegant),
            AppTheme::CyberpunkScarletProtocol => Theme::new(value, CyberpunkScarletProtocol),
            AppTheme::RosePineMoon => Theme::new(value, RosePineMoon),
            AppTheme::Wombat => Theme::new(value, Wombat),
            AppTheme::GruvboxMaterial => Theme::new(value, GruvboxMaterial),
            AppTheme::Sugarplum => Theme::new(value, Sugarplum),
            AppTheme::Medallion => Theme::new(value, Medallion),
            AppTheme::SeoulbonesLight => Theme::new(value, SeoulbonesLight),
            AppTheme::IrixTerminal => Theme::new(value, IrixTerminal),
            AppTheme::Vaughn => Theme::new(value, Vaughn),
            AppTheme::MonokaiProLight => Theme::new(value, MonokaiProLight),
            AppTheme::ParaisoDark => Theme::new(value, ParaisoDark),
            AppTheme::SleepyHollow => Theme::new(value, SleepyHollow),
            AppTheme::Monokai => Theme::new(value, Monokai),
            AppTheme::Argonaut => Theme::new(value, Argonaut),
            AppTheme::Catppuccin => Theme::new(value, Catppuccin),
            AppTheme::TokyoNight => Theme::new(value, TokyoNight),
            AppTheme::Terminal => Theme::new(value, Terminal),
            AppTheme::Chakra => Theme::new(value, Chakra),
            AppTheme::Custom => Theme::new(value, Custom::default()),
        }
    }
}

impl Deref for Theme {
    type Target = Arc<dyn Styler + Send + Sync>;

    fn deref(&self) -> &Self::Target {
        &self.styler
    }
}

impl Serialize for Theme {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        serializer.serialize_str(self.app_theme.id())
    }
}

impl<'de> Deserialize<'de> for Theme {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let theme_str = String::deserialize(deserializer)?;
        let app_theme =
            AppTheme::from_str(&theme_str).map_err(|e| serde::de::Error::custom(e.to_string()))?;
        Ok(Theme::from(app_theme))
    }
}

#[derive(Debug, Clone, Copy, EnumIter, PartialEq, Eq, AsRefStr, EnumString)]
pub enum AppTheme {
    AardvarkBlue,
    Abernathy,
    Adventure,
    AdventureTime,
    Adwaita,
    AdwaitaDark,
    Afterglow,
    Alabaster,
    AlienBlood,
    Andromeda,
    AppleClassic,
    AppleSystemColors,
    AppleSystemColorsLight,
    Arcoiris,
    Ardoise,
    Argonaut,
    Arthur,
    AtelierSulphurpool,
    Atom,
    AtomOneDark,
    AtomOneLight,
    Aura,
    Aurora,
    Ayu,
    AyuLight,
    AyuMirage,
    BananaBlueberry,
    Batman,
    BelafonteDay,
    BelafonteNight,
    BirdsOfParadise,
    BlackMetal,
    BlackMetalBathory,
    BlackMetalBurzum,
    BlackMetalDarkFuneral,
    BlackMetalGorgoroth,
    BlackMetalImmortal,
    BlackMetalKhold,
    BlackMetalMarduk,
    BlackMetalMayhem,
    BlackMetalNile,
    BlackMetalVenom,
    Blazer,
    BlueBerryPie,
    BlueDolphin,
    BlueMatrix,
    BlulocoDark,
    BlulocoLight,
    Borland,
    Breadog,
    Breeze,
    BrightLights,
    Broadcast,
    Brogrammer,
    BuiltinDark,
    BuiltinLight,
    BuiltinPastelDark,
    BuiltinSolarizedDark,
    BuiltinSolarizedLight,
    BuiltinTangoDark,
    BuiltinTangoLight,
    Calamity,
    Catppuccin,
    CatppuccinFrappe,
    CatppuccinLatte,
    CatppuccinMacchiato,
    CatppuccinMocha,
    Cga,
    Chakra,
    Chalk,
    Chalkboard,
    ChallengerDeep,
    Chester,
    Ciapre,
    Citruszest,
    Clrs,
    CobaltNeon,
    CobaltNext,
    CobaltNextDark,
    CobaltNextMinimal,
    CoffeeTheme,
    CrayonPonyFish,
    CursorDark,
    CutiePro,
    Cyberdyne,
    Cyberpunk,
    CyberpunkScarletProtocol,
    DarkModern,
    DarkPastel,
    Darkermatrix,
    Darkmatrix,
    Darkside,
    Dayfox,
    Deep,
    Desert,
    Detuned,
    Dimidium,
    DimmedMonokai,
    Django,
    DjangoRebornAgain,
    DjangoSmooth,
    DoomOne,
    DoomPeacock,
    DotGov,
    Dracula,
    Duckbones,
    DuotoneDark,
    Earthsong,
    ElectronHighlighter,
    Elegant,
    Elemental,
    Elementary,
    Embark,
    EmbersDark,
    Encom,
    Espresso,
    EspressoLibre,
    Everblush,
    EverforestDarkHard,
    EverforestLightMed,
    Fahrenheit,
    Fairyfloss,
    FarmhouseDark,
    FarmhouseLight,
    Fideloper,
    FireflyTraditional,
    FirefoxDev,
    Firewatch,
    FishTank,
    Flat,
    Flatland,
    FlexokiDark,
    FlexokiLight,
    Floraverse,
    ForestBlue,
    Framer,
    FrontEndDelight,
    FunForrest,
    Galaxy,
    Galizur,
    GhosttyDefaultStyleDark,
    Github,
    GithubDark,
    GithubDarkColorblind,
    GithubDarkDefault,
    GithubDarkDimmed,
    GithubDarkHighContrast,
    GithubLightColorblind,
    GithubLightDefault,
    GithubLightHighContrast,
    GitlabDark,
    GitlabDarkGrey,
    GitlabLight,
    Glacier,
    Grape,
    Grass,
    GreyGreen,
    GruberDarker,
    GruvboxDark,
    GruvboxDarkHard,
    GruvboxLight,
    GruvboxLightHard,
    GruvboxMaterial,
    Guezwhoz,
    Hacktober,
    Hardcore,
    Harper,
    HavnDaggry,
    HavnSkumring,
    Heeler,
    Highway,
    HipsterGreen,
    Hivacruz,
    Homebrew,
    Hopscotch,
    Horizon,
    HorizonBright,
    Hurtado,
    Hybrid,
    IcGreenPpl,
    IcOrangePpl,
    IcebergDark,
    IcebergLight,
    Idea,
    IdleToes,
    IrBlack,
    IrixConsole,
    IrixTerminal,
    JackieBrown,
    Japanesque,
    Jellybeans,
    JetbrainsDarcula,
    Jubi,
    KanagawaDragon,
    KanagawaWave,
    Kanagawabones,
    Kibble,
    KittyDefault,
    KittyLowContrast,
    Kolorit,
    Konsolas,
    Kurokula,
    LabFox,
    Laser,
    LaterThisEvening,
    Lavandula,
    LightOwl,
    LiquidCarbon,
    LiquidCarbonTransparent,
    LiquidCarbonTransparentInverse,
    Lovelace,
    ManPage,
    Mariana,
    Material,
    MaterialDark,
    MaterialDarker,
    MaterialDesignColors,
    MaterialOcean,
    Mathias,
    Matrix,
    Medallion,
    MelangeDark,
    MelangeLight,
    Mellifluous,
    Mellow,
    Miasma,
    MidnightInMojave,
    Mirage,
    Misterioso,
    Molokai,
    MonaLisa,
    Monokai,
    MonokaiClassic,
    MonokaiPro,
    MonokaiProLight,
    MonokaiProLightSun,
    MonokaiProMachine,
    MonokaiProOctagon,
    MonokaiProRistretto,
    MonokaiProSpectrum,
    MonokaiRemastered,
    MonokaiSoda,
    MonokaiVivid,
    Moonfly,
    NeobonesDark,
    NeobonesLight,
    Neon,
    Neopolitan,
    Neutron,
    NightOwl,
    NightOwlishLight,
    Nightfox,
    Niji,
    NocturnalWinter,
    Nord,
    NordLight,
    NordWave,
    Novel,
    NvimDark,
    NvimLight,
    Obsidian,
    Ocean,
    OceanicMaterial,
    OceanicNext,
    Ollie,
    OneDoubleDark,
    OneDoubleLight,
    OneHalfDark,
    OneHalfLight,
    OperatorMonoDark,
    OvernightSlumber,
    Oxocarbon,
    PaleNightHc,
    Pandora,
    ParaisoDark,
    PaulMillr,
    PencilDark,
    PencilLight,
    Peppermint,
    PhalaGreenDark,
    PiattoLight,
    Pnevma,
    PoppingAndLocking,
    Powershell,
    Primary,
    Pro,
    ProLight,
    PurpleRain,
    Purplepeter,
    Rapture,
    RaycastDark,
    RaycastLight,
    Rebecca,
    RedAlert,
    RedPlanet,
    RedSands,
    Relaxed,
    Retro,
    RetroLegends,
    Rippedcasts,
    RosePine,
    RosePineDawn,
    RosePineMoon,
    Royal,
    Ryuuko,
    Sakura,
    ScarletProtocol,
    SeaShells,
    SeafoamPastel,
    SelenizedDark,
    SelenizedLight,
    SeoulbonesDark,
    SeoulbonesLight,
    Seti,
    ShadesOfPurple,
    Shaman,
    Slate,
    SleepyHollow,
    Smyck,
    Snazzy,
    SnazzySoft,
    SoftServer,
    SolarizedDarcula,
    SolarizedDarkHigherContrast,
    SolarizedDarkPatched,
    SolarizedOsakaNight,
    Sonokai,
    Spacedust,
    Spacegray,
    SpacegrayBright,
    SpacegrayEighties,
    SpacegrayEightiesDull,
    Spiderman,
    Spring,
    Square,
    SquirrelsongDark,
    Srcery,
    Starlight,
    Sublette,
    Subliminal,
    Sugarplum,
    Sundried,
    Symfonic,
    Synthwave,
    SynthwaveAlpha,
    SynthwaveEverything,
    TangoAdapted,
    TangoHalfAdapted,
    Tearout,
    Teerb,
    Terafox,
    Terminal,
    TerminalBasic,
    TerminalBasicDark,
    ThayerBright,
    TheHulk,
    TinaciousDesignDark,
    TinaciousDesignLight,
    TokyoNight,
    TokyoNightDay,
    TokyoNightMoon,
    TokyoNightNight,
    TokyoNightStorm,
    Tomorrow,
    TomorrowNight,
    TomorrowNightBlue,
    TomorrowNightBright,
    TomorrowNightBurns,
    TomorrowNightEighties,
    ToyChest,
    Treehouse,
    Twilight,
    Ubuntu,
    UltraDark,
    UltraViolent,
    UnderTheSea,
    Unikitty,
    Urple,
    Vague,
    Vaughn,
    Vercel,
    Vesper,
    VibrantInk,
    Vimbones,
    VioletDark,
    VioletLight,
    Violite,
    WarmNeon,
    Wez,
    Whimsy,
    WildCherry,
    Wilmersdorf,
    Wombat,
    Wryan,
    XcodeDark,
    XcodeDarkHc,
    XcodeLight,
    XcodeLightHc,
    XcodeWwdc,
    Zenbones,
    ZenbonesDark,
    ZenbonesLight,
    Zenburn,
    Zenburned,
    ZenwrittenDark,
    ZenwrittenLight,
    Custom,
}

impl AppTheme {
    pub fn id(&self) -> &str {
        self.as_ref()
    }

    pub fn title(&self) -> &str {
        self.as_ref()
    }
}
